package com.cdream.bank1.seata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdream.bank.domain.AccountInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zs
 * @since 2021-08-29
 */
public interface AccountInfoMapper extends BaseMapper<AccountInfo> {
    @Update("update account_info set account_balance = account_balance + #{amount} where account_no = #{accountNo}")
    int updateAccountBalance(@Param("accountNo") String accountNo, @Param("amount") Double amount);
}
